import React from 'react'

export default function Hello () {
  function fn () {
    alert('函数组件1')
  }
  //传参 
  function fn2 (n) {
    alert(n)
  }
  return (
    <div>
      <button onClick={fn}>事件一</button>
      <button onClick={() => { fn2(10) }}>事件二</button>
    </div>
  )
}
